package com.ruoyi.weixin.juc2;

import java.text.SimpleDateFormat;

/**
 * @Description: TODO
 * @Author ONESTAR
 * @Date: 2021/12/24 15:17
 * @Version 1.0
 */
public class DateToolsa {

    private static ThreadLocal<SimpleDateFormat> t1=new ThreadLocal<SimpleDateFormat>();
    public static SimpleDateFormat getSimpledateformat(String datepatter){
        SimpleDateFormat sdf=null;
        sdf=t1.get();
        if(sdf==null){
            sdf=new SimpleDateFormat(datepatter);
            t1.set(sdf);
        }
        return sdf;
    }
}
